CC=i686-pc-mingw32-gcc

all: \
	xdraw1 \
	pngtest \   


test.png: Makefile
	convert -size 100x100 xc:blue -fill blue -draw "rectangle 0,0 3,3" PNG32:test.png

%.o: %.c
	${CC} -I../arch-win32 -g3 -c $< -o $@
    
%.o: ../common/%.c
	${CC} -I../arch-win32 -g3 -c $< -o $@

xdraw1: image.o xdraw1.o coordconv.o
	${CC} $^ -o $@ -g3 -Wl,-rpath=${HOME}/local/lib -L${HOME}/local/lib -lm -lproj -lX11 -lpng

pngtest: pngtest.o pic.o app-win32.o
	${CC} $^ -o $@ -g3 -static -lm -lproj -lpng -lz -lmsvcrt -luser32 -lopengl32 -lgdi32

run: xdraw1
	./xdraw1

clean:
	rm pngtest xdraw1 *.o
